package news;

import java.sql.Timestamp;

/**
 * 新闻基本信息类(一般跟数据库的表对应)
 * @author 谢一弘
 * @date 2020-5-8
 */
public class News {

	//select nid,title,content,uid,pubtime,isValid from news;
	private int nid;//编号
    private String title;//新闻标题
    private String  content;//新闻正文
    private int uid;//发布者
    private String uname;//作者
    public String getUname() {
		return uname;
	}
	public void setUname(String uname) {
		this.uname = uname;
	}
	private Timestamp  pubtime;//发布时间
    private int isValid;//是否有效
    private int isTop;//是否置顶
    
	public News() {
   	 
    }
    public News(int nid) {
   	 this.nid = nid;
    }
    public News(String title) {
   	 this.title = title;
    }
    public News(int nid,String title) {
		this.nid = nid;
		this.title = title;
	}
	public int getNid() {
		return nid;
	}
	public void setNid(int nid) {
		this.nid = nid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public int getUid() {
		return uid;
	}
	public void setUid(int uid) {
		this.uid = uid;
	}
	public Timestamp getPubtime() {
		return pubtime;
	}
	public void setPubtime(Timestamp pubtime) {
		this.pubtime = pubtime;
	}
	public int getIsValid() {
		return isValid;
	}
	public void setIsValid(int isValid) {
		this.isValid = isValid;
	}
	public int getIsTop() {
		return isTop;
	}
	public void setIsTop(int isTop) {
		this.isTop = isTop;
	}  
}
